﻿using System.Collections.Generic;
using System.ComponentModel;
using System;
using System.Text;
using System.Xml.Serialization;

namespace NTTDATA.BEENChina.ResultCertification.PropertyGridUtil.CustomObject
{
    [TypeConverter(typeof(CustomConverter))]
    public class StringArray  : PropertyData
    {
 
        [XmlArray(ElementName = "array", IsNullable = true)]
        [XmlArrayItem(ElementName = "string", NestingLevel = 0, IsNullable = true)]
        public String[] array
        {
            get; 
            set; 
        }

        #region PropertyData impl
        public string GetDisplayName()
        {
            return array == null ? "": string.Join(",", array);
        }
        public string GetDescription()
        {
            return array == null ? "" : string.Join(",", array);
        }

        public string GetValue()
        {            
            return array == null ? "" : string.Join(",", array);
        }
        #endregion
    }
}
